<?php
/**
 * Template Name: Contact
 */
get_header();
?>

<script type=text/javascript>
    jQuery(document).ready(function ($) {

        if ($.browser.msie) {
            $('.wpcf7-form input[type="submit"]').css({
                border: 0,
                float: 'right',
                marginRight: '30px',
                textAlign: 'right'
            });
        }
    })
</script>
    
<table cellspacing="0px" cellpadding="0px" border="0" class="wherewearebox">
    <tr>
        <td valign="top" height="68px" colspan="2">
            <table cellspacing="0px" cellpadding="0px" border="0" class="menubar">
                <tr>
                    <td width="360px"><a href="<?php echo home_url('/') ?>"><img
                            src="<?php bloginfo('stylesheet_directory')?>/images/logo.png" border="0" height="66px"
                            width="223px"></a></td>
                    <?php wv_top_menu() ?>
                </tr>
            </table>
            <!-- table menu -->
        </td>
    </tr>
    <tr>
        <td class="contact">
            <?php global $post;

			$pageID = $post->ID;
			$page_title = $post->post_title;
			
            query_posts(array('p' => $post->post_parent, 'post_type' => array('page'))); //Query parent
            if (have_posts()) { the_post(); the_content(); }

            query_posts(array('post_parent' => $post->ID, 'post_type' => 'page', 'orderby' => 'menu_order', 'order' => 'asc')); //Query children ?>
                <br/><br/><br/><br/>
                <?php 
					while (have_posts()) : the_post();
					if (($post->ID == $pageID) || ( ($page_title == 'Vacancy Form') && ($post->post_title == 'Opportunity') ) ){
						$class = "currentwherelinks";
					} else {
						$class = "";
					}
					if (get_the_title() == "Vacancy Form") continue;
				?>
                    <a href="<?php the_permalink(); ?>" class="child-pages wherelinks normallinks <?php echo $class ?>"><?php the_title(); ?></a><br />
                <?php endwhile; ?>
        </td>
        <td align="right" class="vacancy">
            <table>
                <?php query_posts(array('p' => $pageID, 'post_type' => array('page'))); 
				while (have_posts()) : the_post();
                if (get_the_title() != '') { ?>
                <tr class="show-content" rel="<?php the_permalink(); ?>">
                    <td>
                        <?php the_content(); ?>
                    </td>
                </tr>
                <?php } else { ?>
                <tr class="hidden-content" style="display:none;" rel="<?php the_permalink(); ?>">
                    <td>
                        <?php the_content(); ?>
                    </td>
                </tr>
                <?php } endwhile; ?>
            </table>
        </td>
    </tr>
</table>

<?php //get_sidebar(); ?>
<?php get_footer(); ?>